package com.example.networklab.common;

public enum ExceptionEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS("200", "成功"),

    LOGIN_ERROR("5001", "用户名或密码错误"),

    PARAM_ERROR("5002", "参数错误"),


    OLD_PASSWORD_ERROR("5003", "旧密码错误"),
    USERNAME_EXIST("5004", "用户名已存在"),
    TASK_NOT_IN_TIME("5005", "不在作业提交时间内"),
    TASK_SUBMIT_TOO_FREQUENT("5006", "提交作业过于频繁"),

    NO_GRADE("5007", "暂未查询到成绩"),
    TASK_NOT_END("5008", "作业未结束"),
    DELETE_TASK_ERROR("5009", "已经开始的作业不能删除"),
    ;


    /**
     * 错误码
     */
    private final String resultCode;

    /**
     * 错误描述
     */
    private final String resultMsg;

    ExceptionEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
